<template>
  <div>
    <h1>App:{{ count }}</h1>

    <!-- 
      如果是自定义事件,则自定义事件的插值语法中也存在一个$event,代表自定义事件传递的值
     -->
    <Count :count="count" @changeCount="count += $event" />
  </div>
</template>

<script>
import Count from "@/components/Count";
export default {
  name: "App",
  data() {
    return {
      count: 1,
    };
  },
  components: {
    Count,
  },
  methods: {},
  mounted() {},
};
</script>

<style></style>
